{template "header.html"}

{if $admin.usermenu}
<div class="row">
    <div class="col-md-12">
        <div class="admin-usermenu">
            {loop $admin.usermenu $t}
            <a class="btn {if $t.color && $t.color!='default'}{$t.color}{else}btn-default{/if}" {if $t.target} target="_blank" {/if} href="{$t.url}"> {$t.name} </a>
            {/loop}
        </div>
    </div>
</div>
{/if}

<div class="row widget-row">
    <div class="col-md-3">
        <!-- BEGIN WIDGET THUMB -->
        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
            <div class="widget-thumb-wrap">
                <i class="widget-thumb-icon bg-green fa fa-user"></i>
                <div class="widget-thumb-body">
                    <span class="widget-thumb-subtitle">用户数</span>
                    <a href="{php echo \Phpcmf\Service::M('auth')->_menu_link_url('member/index');}" class="widget-thumb-body-stat" data-counter="counterup" data-value="0" id="dr_member_total">0</a>
                </div>
            </div>
        </div>
        <!-- END WIDGET THUMB -->
    </div>
    <div class="col-md-3">
        <!-- BEGIN WIDGET THUMB -->
        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
            <div class="widget-thumb-wrap">
                <i class="widget-thumb-icon bg-red icon-layers"></i>
                <div class="widget-thumb-body">
                    <span class="widget-thumb-subtitle">商品数</span>
                    <a  href="{php echo \Phpcmf\Service::M('auth')->_menu_link_url('goods/home/index');}" class="widget-thumb-body-stat" data-counter="counterup" data-value="0" id="dr_goods_total">0</a>
                </div>
            </div>
        </div>
        <!-- END WIDGET THUMB -->
    </div>
    <div class="col-md-3">
        <!-- BEGIN WIDGET THUMB -->
        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
            <div class="widget-thumb-wrap">
                <i class="widget-thumb-icon bg-purple fa fa-shopping-cart"></i>
                <div class="widget-thumb-body">
                    <span class="widget-thumb-subtitle">新订单</span>
                    <a  href="{php echo \Phpcmf\Service::M('auth')->_menu_link_url('order/home/index');}" class="widget-thumb-body-stat" data-counter="counterup" data-value="0" id="dr_order_total">0</a>
                </div>
            </div>
        </div>
        <!-- END WIDGET THUMB -->
    </div>
    <div class="col-md-3">
        <!-- BEGIN WIDGET THUMB -->
        <div class="widget-thumb widget-bg-color-white text-uppercase margin-bottom-20 bordered">
            <div class="widget-thumb-wrap">
                <i class="widget-thumb-icon bg-blue fa fa-opera"></i>
                <div class="widget-thumb-body">
                    <span class="widget-thumb-subtitle">店铺数</span>
                    <a  href="{php echo \Phpcmf\Service::M('auth')->_menu_link_url('mall/home/index');}" class="widget-thumb-body-stat" data-counter="counterup" data-value="0" id="dr_mall_total">0</a>
                </div>
            </div>
        </div>
        <!-- END WIDGET THUMB -->
    </div>
</div>


<div class="row">



    <div class="col-md-6 col-sm-6">
        <div class="portlet light bordered myportlet">
            <div class="portlet-title tabbable-line">
                <div class="caption">
                    <i class="fa fa-cloud"></i>
                    <span class="caption-subject"> <a style="color:#666" href="{dr_url('cloud/index')}">{dr_lang('网站系统')}</a> </span>
                </div>
            </div>
            <div class="portlet-body">

                <div class="scroller" style="height: 250px;" data-always-visible="1" data-rail-visible="0">
                    <div class="col-md-9">
                        <ul class="use-info">
                            <li>
                                <span>系统版本：</span>
                                <a target="_blank" href="http://www.xunruicms.com/">v{$cms_version}</a>
                                <a id="dr_cms_update" href="{dr_url('cloud/update')}" style="margin-left: 10px;display: none" class="badge badge-danger badge-roundless">  </a>
                            </li>
                            <li>
                                <span>框架版本：</span>
                                <a target="_blank" href="http://www.xunruicms.com/">v{$cmf_version}</a>
                                <a id="dr_cmf_update" href="{dr_url('cloud/update')}" style="margin-left: 10px;display: none" class="badge badge-danger badge-roundless">  </a>
                            </li>
                          
                    <li>
                        <span>官方网站：</span>
                        <a target="_blank" href="http://www.xunruicms.com/">www.xunruicms.com</a>
                    </li>
                    <li>
                        <span>使用教程：</span>
                        <a target="_blank" href="http://www.xunruicms.com/">www.xunruicms.com/doc/</a>
                    </li>
                    <li>
                        <span>技术论坛：</span>
                        <a target="_blank" href="http://www.xunruicms.com/">www.xunruicms.com/wenda/</a>
                    </li>

                        </ul>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <div class="col-md-6 col-sm-6">
        <div class="portlet light bordered myportlet">
            <div class="portlet-title tabbable-line">
                <div class="caption">
                    <i class="fa fa-bell"></i>
                    <span class="caption-subject"> <a style="color:#666" href="{dr_url('notice/my_index')}">{dr_lang('系统提醒')}</a> </span>
                </div>
            </div>
            <div class="portlet-body">

                <div class="scroller" style="height: 250px;" data-always-visible="1" data-rail-visible="0">
                <?php $notice = \Phpcmf\Service::M('auth')->admin_notice();?>
                {if !$notice}
                <div style="padding-top: 30px;padding-bottom: 30px;text-align: center;color: #d7d8da;"> {dr_lang('无任何提醒')} </div>
                {else}
                <ul class="feeds" style="padding-bottom: 20px">
                    {loop $notice $t}
                    <li>
                        <div class="col1" style="padding-top: 2px;padding-left: 3px;">
                            <div class="cont">
                                <div class="cont-col1 user-avatar">
                                    <a href="{dr_url('api/notice', array('id' => $t.id))}"><img style="height: 25px!important;" src="{dr_avatar($t.uid)}" /></a>
                                </div>
                                <div class="cont-col2">
                                    <div class="desc"><a href="{dr_url('api/notice', array('id' => $t.id))}">{$t.msg}</a></div>
                                </div>
                            </div>
                        </div>
                        <div class="col2">
                            <div class="date"> {dr_fdate($t.inputtime)} </div>
                        </div>
                    </li>
                    {/loop}
                </ul>
                {/if}

                </div>
            </div>
        </div>

    </div>
</div>

<script>
    $(function () {
        $.ajax({type: "GET",dataType:"json", url: admin_file+"?s=mall&c=api&m=count_total",
            success: function(json) {
                if (json.code) {
                    $('#dr_member_total').html(json.data.member);
                    $('#dr_goods_total').html(json.data.goods);
                    $('#dr_order_total').html(json.data.order);
                    $('#dr_mall_total').html(json.data.mall);
                }
            },
            error: function(HttpRequest, ajaxOptions, thrownError) {

            }
        });
        $.ajax({type: "GET",dataType:"json", url: "{dr_url('api/version_cmf')}",
            success: function(json) {
                if (json.code) {
                    $('#dr_cmf_update').show();
                    $('#dr_cmf_update').html('{dr_lang('升级')} v'+json.msg);
                }
            }
        });
        $.ajax({type: "GET",dataType:"json", url: "{dr_url('api/version_cms')}",
            success: function(json) {
                if (json.code) {
                    $('#dr_cms_update').show();
                    $('#dr_cms_update').html('{dr_lang('升级')} v'+json.msg);
                }
            }
        });
    });
</script>

{template "footer.html"}